<?php
namespace App\Action;
use YzmPHP\core\YzmDbPdo;
use App\Util\ActionMiddleware;
use App\Model\userModel;
class IndexAction extends ActionMiddleware
{
    
    public function index(){
       //$this->input['user_id'];
        $name = '云知梦';
        $age = 6;
        $data = array(
            'name'=>$name,
            'age'=>$age,
        );
       $model = new YzmDbPdo();
       $sql = 'select * from run_user';
       $_data = $model->getRows($sql);
       echo '<pre>';
       print_r($_data);
        
        $this->display('index/index.html',$data);
    }
    public function return_test(){
        return 'rrr';
    } 
    public function mem(){
//        setVar('age', '18');
         dump(getVar('age'));
        //delVar('name');
    }
    
    public function redis_test(){
        $redis = R();
//        $redis->set('name','good');
//        $name = $redis->get('name');
        //$redis->lpush('sql', 'select * from user');
        $sql = $redis->rpop('sql');
        var_dump($sql);
    }
    
}

